import config from '../config/config';
import request from '../utils/request';

let service = {};

//可提现金额明细
service.getbilllist = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getbilllist;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

//发送提现验证码
service.withdrawverifycode = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.withdrawverifycode;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'POST',
    success: res => {
      cb(res);
    },
    
  });
}

//提现
service.getwithdraw = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.withdraw;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'POST',
    success: res => {
      cb(res);
    }
  });
}

//获取用户余额
service.getcustomerbalance = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getcustomerbalance;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

module.exports = service;
